package com.itheima.d07_junit_annotation;





/**
 * 字符串工具类
 */
public class StringUtils {

    /**
     * 翻转字符串
     * @param str
     * @return
     */
    public  String reverse(String str){
        if(str == null){
            System.out.println("数据为空");
            return null;
        }

        String result = "";
        for (int i = str.length()-1; i >=0 ; i--) {
            result += str.charAt(i);
        }
        return result;
    }


}
